﻿using ConfExpert.Forms.Base;
using Extensions;
using System;

namespace ConfExpert.Forms.Sistem
{
    public partial class LookupMap : XForm
    {
        public LookupMap()
        {
            InitializeComponent();
        }

        private void LookupMap_Load(object sender, EventArgs e)
        {
            //TODO: SetPK ekle!
            
            gridView1.Init("GetLookupMap");
            gridView1.AddSummary();
            gridView1.BestFitColumns();
            gridView1.OptionsView.NewItemRowPosition = DevExpress.XtraGrid.Views.Grid.NewItemRowPosition.Bottom;

            barButtonItem1.ItemClick += barButtonItem1_ItemClick;
        }

        void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            gridView1.EndEdit();
            gridView1.Update("", "LookUpMap");
            gridView1.VeriyiGuncelle("GetLookupMap");
            gridView1.BestFitColumns();
            Notify("Kaydedildi");
        }
    }
}
